package com.hoshiibuy.sku.feign;

import com.hoshiibuy.common.rpc.Response;
import com.hoshiibuy.sku.feign.hystrix.HystrixSpuFeignFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * @author zhangshuhu
 * @title: CompanyService
 * @projectName hoshiibuy
 * @description: 公司微服务
 * @since 2019-04-28
 */
@FeignClient(name = "hoshiibuy-spu", fallback = HystrixSpuFeignFallback.class)
public interface SpuService {

    /**
     * 获取基础Spu
     * @return
     */
    @RequestMapping(value = "/baseSpu/{id}", method = RequestMethod.GET)
    Response getBaseSpu(Long id);

    /**
     * 获取扩展Spu
     * @return
     */
    @RequestMapping(value = "/extSpu/{id}", method = RequestMethod.GET)
    Response getExtSpu(@PathVariable("id") Long id);

}
